#Include "message.bas"
#include "sock.bi"

Function BotMain Alias "BotMain" ( rawmsg As String ) As message Export

   Dim as message n

   Dim as IRC.message myMessage

   myMessage.parse( rawmsg )

   dim as string temp=myMessage.param (myMessage.trailing)

   if instr(lcase(temp), "^about") then
        n.dest=myMessage.param(0)
        n.msg = "RedBall v0.02.15 by _spaz and King_anarky. Socket library adapted from cha0s' socket library. Accepted commands: ^insult (name). RedBall coded entirely in FreeBasic CVS Update March 26, 2007."
        n.msgtype=1
   endif

    if instr (lcase(temp), "linux sucks") or instr (lcase(temp), "bsd sucks")  then

	n.dest=myMessage.param(0)
	n.msg = "You suck, " & myMessage.id & "!"
	n.msgtype=1
    endif

    if instr (lcase(temp), "windows sucks") then

        n.dest=myMessage.param(0)
        n.msg = "No shit, " & myMessage.id & "! Use Linux or *BSD."
        n.msgtype=1
    endif


    Return n
End Function
